package com.zmn.plat.services.impl.product;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zmn.common.dto.StatusDTO;
import com.zmn.plat.model.entity.product.ServSubsidiaryGroup;
import com.zmn.plat.model.entity.product.ServSubsidiaryGroupQuery;
import com.zmn.plat.persistence.interfaces.product.ServSubsidiaryGroupDAO;
import com.zmn.plat.services.interfaces.product.ServSubsidiaryGroupService;

/**
 * 描述:ServSubsidiaryGroupServiceImpl
 *
 * @author tanghongjun
 * @since: 2018/10/16 17:56
 */
@Service
public class ServSubsidiaryGroupServiceImpl implements ServSubsidiaryGroupService {

    @Resource
    private ServSubsidiaryGroupDAO servSubsidiaryGroupDAO;

    @Override
    public ServSubsidiaryGroup findByKey(Integer groupId) {
        return servSubsidiaryGroupDAO.findByKey(groupId);
    }
    @Override
    public  List<ServSubsidiaryGroup> findByKeys(List<Integer> groupIds) {
        return servSubsidiaryGroupDAO.findByKeys(groupIds);
    }


    @Override
    public Integer findKeyForMax() {
        return servSubsidiaryGroupDAO.findKeyForMax();
    }

    @Override
    public List<ServSubsidiaryGroup> listPageByQuery(ServSubsidiaryGroupQuery query) {
        return servSubsidiaryGroupDAO.listPageByQuery(query);
    }

    @Override
    public List<ServSubsidiaryGroup> listByQuery(ServSubsidiaryGroupQuery query) {
        return servSubsidiaryGroupDAO.listByQuery(query);
    }

    @Override
    public List<ServSubsidiaryGroup> listAll() {
        return servSubsidiaryGroupDAO.listAll();
    }

    @Override
    public Integer countByQuery(ServSubsidiaryGroupQuery query) {
        return servSubsidiaryGroupDAO.countByQuery(query);
    }

    @Override
    public Integer updateByKey(ServSubsidiaryGroup servSubsidiaryGroup) {
        return servSubsidiaryGroupDAO.updateByKey(servSubsidiaryGroup);
    }

    @Override
    public Integer updateStatus(ServSubsidiaryGroup servSubsidiaryGroup) {
        return servSubsidiaryGroupDAO.updateStatus(servSubsidiaryGroup);
    }

    @Override
    public Integer updateStatusBatch(StatusDTO dto) {
        return servSubsidiaryGroupDAO.updateStatusBatch(dto);
    }

    @Override
    public Integer insert(ServSubsidiaryGroup servSubsidiaryGroup) {
        return servSubsidiaryGroupDAO.insert(servSubsidiaryGroup);
    }

    @Override
    public Integer deleteByKey(Integer groupId) {
        return servSubsidiaryGroupDAO.deleteByKey(groupId);
    }
}